<?php

use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use common\components\MTools;

$data = frontend\models\WB_User::getuserbase();
echo $this->render("//layouts/breadcrumb", ["url" => Url::toRoute(["site/index"]), "title" => "控制台"]);
?>
<div class="" style="margin-top: 90px;margin-left: 60px;">
    <div class="mg10" style="height:10px;"></div>
    <div class="span5" style="margin-left: 20px;margin-right: 10px;">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <span class="label-primary label pull-right">今天</span>
                <h5>已发布任务</h5>
            </div>
            <div class="ibox-content">
                <h1 class="no-margins"><?php echo \frontend\models\WB_Task::getUserTaskCount(Yii::$app->user->id); ?></h1>
            </div>
        </div>
    </div>
    <div class="span5" style="margin-left: 20px;">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>账户余额</h5>
            </div>
            <div class="ibox-content">
                <h1 class="no-margins">￥<?php echo Yii::$app->formatter->asDecimal(ArrayHelper::getValue($data, "useraccount.amount", 0)); ?></h1>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <?php echo MTools::getTemplate("index-notice.html"); ?>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <?php echo MTools::getTemplate("index-tasknotice.html"); ?>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <?php echo MTools::getTemplate("index-function.html"); ?>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <?php echo MTools::getTemplate("index-attention.html"); ?>
            </div>
        </div>
    </div>
</div>